package com.excel.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.data.entity.JsonDataitem;
import com.entity.Meter;
import com.entity.Recharge;
import com.excel.service.ExcelRechargeReportService;
import com.recharge.entity.JsonRecharge;
import com.utils.JsonResult;

/**   
* @Title: ExcelRechargeReportController.java 
* @Package com.entity.controller 
* @author 孙梦楠 
* @date 2017年10月9日 上午11:16:47 
* @version V1.0.0   
*/
@RestController
@RequestMapping(value = "/excel/recharge")
public class ExcelRechargeReportController {
	
	@Autowired
	private ExcelRechargeReportService Excelrechargereportservice;
	
	@RequestMapping(value = "/out", method = RequestMethod.POST)
	public JsonResult<List<JsonRecharge>> ExcelRechargeReport(@RequestBody Recharge recharge,
			@CookieValue(value = "opecodecookie", required = false) String opecodecookie,
			@CookieValue(value = "languagecookie", required = false) String languagecookie) throws Exception {
		
		String issuetime1 = recharge.getIssuetime();
		String issuetime2 = recharge.getRechargetime();
		
		return Excelrechargereportservice.rechargereport(issuetime1, issuetime2, opecodecookie, languagecookie);
	}

}
